home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-05-11 | 1.1 KB | 33 lines | [TEXT/GEOL] |
- Item 7464321 8-May-90 11:33PDT
-
- From: DAWSON.M Dawson, Mark
-
- To: MACAPP.TECH$ MacApp Technical
-
- Sub: Get resources into files
-
- I have a problem w/my resources getting into my saved file (they never show
- up).
-
- My TDTextDocument::DoWrite() code looks like:
- Handle temp;
- FailOSErr(PtrToHand((Ptr)&fMyData,&temp,fMyDataLen); // copy data into a hndl
- AddResource(temp,'tttt',1000,"\p");
- FailResError();
- long textBytes = fTextHdlLen;
- FailOSErr(FSWrite(aRefNum, &textBytes, (Ptr)*fTextHdl));
- inherited::DoWrite(aRefNum,makingCopy);
-
- The FSWrite (to the data fork) works, but the AddResource doesn't seem to do
- anything (FailResError() isn't being executed, so it isn't failing). ResEdit
- says there is no resource fork for the file.
-
- I was writing both the text && the data to the data fork, but I decided to put
- the data into the resource fork, so I could make the file readble by text
- processing programs (i.e. 'TEXT' types). Is there something I need to do to
- make MacApp write out the resource to the file?
-
- Thanks,
- Mark
-
-